/**
 * Project		: anveshitha
 * Filename		: anveshitha.query.QueryResult.java
 * Author		: varun
 * Date			: Jun 16, 2008, 7:04:43 PM
 * Description	: a model to store the query results		
 * License		: GNU LESSER GENERAL PUBLIC LICENSE (http://www.gnu.org/licenses/lgpl-3.0.txt)
 */
package anveshitha.query;

import java.util.Arrays;
import java.util.List;

import anveshitha.config.AnveshithaConstants;

/**
 * @author varun
 */
public class QueryResult {

	private String className;
	private List<String> imports;
	private List<String> methods;
	private String comments;
	private String superClassName;
	private List<String> interfaces;
	private String packageName;
	private String filepath;

	/**
	 * @return the className
	 */
	public String getClassName() {
		return this.className;
	}

	/**
	 * @param className
	 *            the className to set
	 */
	public void setClassName(String className) {
		this.className = className;
	}

	/**
	 * @return the imports
	 */
	public List<String> getImports() {
		return this.imports;
	}

	/**
	 * @param imports
	 *            the imports to set
	 */
	public void setImports(List<String> imports) {
		this.imports = imports;
	}

	/**
	 * @return the methods
	 */
	public List<String> getMethods() {
		return this.methods;
	}

	/**
	 * @param methods
	 *            the methods to set
	 */
	public void setMethods(List<String> methods) {
		this.methods = methods;
	}

	/**
	 * @return the comments
	 */
	public String getComments() {
		return this.comments;
	}

	/**
	 * @param comments
	 *            the comments to set
	 */
	public void setComments(String comments) {
		this.comments = comments;
	}

	/**
	 * @return the superClassName
	 */
	public String getSuperClassName() {
		return this.superClassName;
	}

	/**
	 * @param superClassName
	 *            the superClassName to set
	 */
	public void setSuperClassName(String superClassName) {
		this.superClassName = superClassName;
	}

	/**
	 * @return the interfaces
	 */
	public List<String> getInterfaces() {
		return this.interfaces;
	}

	/**
	 * @param interfaces
	 *            the interfaces to set
	 */
	public void setInterfaces(List<String> interfaces) {
		this.interfaces = interfaces;
	}

	/**
	 * @return the packageName
	 */
	public String getPackageName() {
		return this.packageName;
	}

	/**
	 * @param packageName
	 *            the packageName to set
	 */
	public void setPackageName(String packageName) {
		this.packageName = packageName;
	}

	/**
	 * @return the filepath
	 */
	public String getFilepath() {
		return this.filepath;
	}

	/**
	 * @param filepath
	 *            the filepath to set
	 */
	public void setFilepath(String filepath) {
		this.filepath = filepath;
	}

	// helpers
	/**
	 * @param methods the methods to set
	 */
	public void setMethods(String[] methods) {
		if(null != methods)
		this.methods = Arrays.asList(methods);
	}
	/**
	 * @param imports the imports to set
	 */
	public void setImports(String[] imports) {
		if(null != imports)
		this.imports = Arrays.asList(imports);
	}
	/**
	 * @param interfaces the interfaces to set
	 */
	public void setInterfaces(String[] interfaces) {
		if(null != interfaces)
		this.interfaces = Arrays.asList(interfaces);
	}
	/**
	 * @return the filename
	 */
	public String getFilename() {
		return (this.filepath).substring((this.filepath).lastIndexOf(AnveshithaConstants.FILE_SEPARATOR)+1);
	}


}
